Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
|
||
| KNOWN_BACKENDS = {"cpu", "cuda", "metal", "neuron", "rocm", "xpu", "npu"} | ||
|
|
||
| TRUSTED_KERNEL_ORGS = {"kernels-community", "kernels-test", "sglang"} |
There was a problem hiding this comment.
| TRUSTED_KERNEL_ORGS = {"kernels-community", "kernels-test", "sglang"} | |
| TRUSTED_KERNEL_ORGS = {"kernels-community", "kernels-staging", "kernels-test", "sglang"} |
There was a problem hiding this comment.
{"kernels-community", "kernels-staging", "kernels-test", "sglang"}
Can we ensure the above list is consistent with the Hub?
There was a problem hiding this comment.
thanks for the feedback, i've updated _check_trust_remote_code to check the repo_info response for the trustedPublisher attribute.
full logic is:
- if
trust_remote_code=True, skip all checks - check the hardcoded list (just "kernels-test" for now)
- fetch the repo_info and check attribute
Co-authored-by: Daniël de Kok <me@danieldk.eu>
| ) | ||
|
|
||
| org = repo_id.split("/", 1)[0] | ||
| if org in _ALWAYS_TRUSTED_ORGS: |
There was a problem hiding this comment.
Do we need this, since kernels-test is already a trusted org. That way, this would get properly tested during tests as well.
There was a problem hiding this comment.
nope this is unneeded now (just ran into some CI issues without this special case earlier). it looks like kernels-test are returning the trustedPublisher attribute now after some spot checks.
removed in latest
There was a problem hiding this comment.
ahh the issue is now we surface a untrusted publisher if the repo info cannot be fetched since the check depends on the repo info. need to revisit with a better solution
Co-authored-by: Daniël de Kok <me@danieldk.eu>


This PR adds a
trust_remote_codeand hardcoded list of trusted orgs